FED-4495 System sx migrator#329
Conversation
This reverts commit eedbe7a
kealjones-wk
left a comment
There was a problem hiding this comment.
+10
Comments about possible changes are totally optional... seems like it covers everything really well. Nice work.
|
|
||
| const sxPrecedenceFixme = | ||
| '// FIXME(mui_system_props_migration) - Previously, it was possible for forwarded system props to overwrite these migrated styles, but not anymore since sx takes precedence over any system props.' | ||
| '\n // Double-check that this new behavior is okay.'; |
There was a problem hiding this comment.
This is a hard thing to consider... so this is only really an issue when the usage of the component hasn't been migrated to sx and is still using system props... I was gonna say what if we made a utility like systemPropsToSx(props) that would just like grab any system props name and move it into the props.sx object... but like that seems like overkill and like it is a pretty unlikely case.
There was a problem hiding this comment.
Good though; yeah my guess is that it's unlikely enough that we probably shouldn't worry about up front, but we can always do that down the road if it becomes an issue!
|
@Workiva/release-management-p |
Motivation
MUI v6 deprecated system props on its components, instructing consumers to migrate to
sxinstead: https://mui.com/material-ui/migration/migrating-from-deprecated-apis/#system-propsWe have some MUI Dart wrappers that should be migrated, that their existing codemod won't work for.
Changes
mui_system_props_migrationcodemod executable, which migrates system props tosxsxand deprecated system props)Linkcomponent I originally missedsxprops and prop forwarding, merging them while preserving existing behavior as best as possibleExample migration
Before (system props):
After (all system props migrated to SX):
Release Notes
Review
See CONTRIBUTING.md for more details on review types (+1 / QA +1 / +10) and code review process.
Please review:
QA Checklist
Merge Checklist
While we perform many automated checks before auto-merging, some manual checks are needed: